package com.ruoyi.esm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.esm.mapper.FaEsmDeviceMapper;
import com.ruoyi.esm.domain.FaEsmDevice;
import com.ruoyi.esm.service.IFaEsmDeviceService;

/**
 * 产线Service业务层处理
 * 
 * @author colin
 * @date 2021-08-10
 */
@Service
public class FaEsmDeviceServiceImpl implements IFaEsmDeviceService 
{
    @Autowired
    private FaEsmDeviceMapper faEsmDeviceMapper;

    /**
     * 查询产线
     * 
     * @param id 产线主键
     * @return 产线
     */
    @Override
    public FaEsmDevice selectFaEsmDeviceById(String id)
    {
        return faEsmDeviceMapper.selectFaEsmDeviceById(id);
    }

    /**
     * 查询产线列表
     * 
     * @param faEsmDevice 产线
     * @return 产线
     */
    @Override
    public List<FaEsmDevice> selectFaEsmDeviceList(FaEsmDevice faEsmDevice)
    {
        return faEsmDeviceMapper.selectFaEsmDeviceList(faEsmDevice);
    }

    /**
     * 新增产线
     * 
     * @param faEsmDevice 产线
     * @return 结果
     */
    @Override
    public int insertFaEsmDevice(FaEsmDevice faEsmDevice)
    {
        faEsmDevice.setCreateTime(DateUtils.getNowDate());
        return faEsmDeviceMapper.insertFaEsmDevice(faEsmDevice);
    }

    /**
     * 修改产线
     * 
     * @param faEsmDevice 产线
     * @return 结果
     */
    @Override
    public int updateFaEsmDevice(FaEsmDevice faEsmDevice)
    {
        faEsmDevice.setUpdateTime(DateUtils.getNowDate());
        return faEsmDeviceMapper.updateFaEsmDevice(faEsmDevice);
    }

    /**
     * 批量删除产线
     * 
     * @param ids 需要删除的产线主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmDeviceByIds(String[] ids)
    {
        return faEsmDeviceMapper.deleteFaEsmDeviceByIds(ids);
    }

    /**
     * 删除产线信息
     * 
     * @param id 产线主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmDeviceById(String id)
    {
        return faEsmDeviceMapper.deleteFaEsmDeviceById(id);
    }
}
